Sign Function

Returns the sign of the number passed to it.

Syntax

result = Sign( value )


Parameters

value

Double

The number being passed to the function.



Example

The following example determines the sign of the number passed to it.

Dim d as Double
Dim result as Integer
If EditField1.text <>"" then
 result=Sign( Val(EditField1.text))
  MsgBox Str(result)
Else
  MsgBox "Please enter a number!"
End if

See Also

Abs, Val functions.